﻿using System;
using System.Threading.Tasks;
using System.Linq.Expressions;


using Oliving.Edge.Model;
using Oliving.Edge.Model.Dto;
using Oliving.Edge.Model.Models;
using Oliving.Edge.IServices;
using Oliving.Edge.IRepository;
using Oliving.Edge.Services.BASE;
using System.Collections.Generic;
using Oliving.Edge.Model.ViewModels.ReportDto;

namespace Oliving.Edge.Services
{
    public partial class DTSN_CanningServices : BaseServices<DTSN_Canning>, IDTSN_CanningServices
    {
        IDTSN_CanningRepository _dal;
        public DTSN_CanningServices(IDTSN_CanningRepository dal)
        {
            this._dal = dal;
            base.BaseDal = dal;
        }



        public async Task<PageModel<DTSN_CanningPageDto>> QueryPageList(
            Expression<Func<DTSN_Canning, bool>> whereExpression,
            int intPageIndex = 1,
            int intPageSize = 20,
            string strOrderByFileds = null)
        {
            var page = await _dal.QueryPageList(whereExpression, intPageIndex, intPageSize, strOrderByFileds);
            return page;
        }


        public async Task<List<ChartDto>> ReportChart
            (Expression<Func<DTSN_Canning, bool>> whereExpression)
        {
            var page = await _dal.ReportChart(whereExpression);
            return page;
        }


    }
}

